package com.sumainfor.pc.market.controller.rentadviser;
import com.sumainfor.common.util.JsonResult;
import com.sumainfor.pc.market.service.RdHousingTemcodeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.io.Serializable;
import java.util.Map;

/**
 * 临时密码（每天只能申请三次）
 */
@RestController
@RequestMapping("/tenant/key/rentadviser/RdHouTemcode")
public class RdWxHousingTemcodeController implements Serializable {
    @Autowired
    private RdHousingTemcodeService rdHousingTemcodeService;
    /**
     *给租客发送临时密码（每个租客每天只能发三次）
     */
    @PostMapping("/addRdHouTemcode")
    public JsonResult addRdHouTemcode(@RequestBody Map<String,Object>params) {
        return rdHousingTemcodeService.addRdHouTemcode(params);
    }
    /**
     *查询租客当天申请临时密码的次数
     */
    @GetMapping("/getRdHouTemcodeCount")
    public JsonResult getRdHouTemcodeCount(@RequestParam Map<String,Object>params) {
        return rdHousingTemcodeService.getRdHouTemcodeCount(params);
    }
}
